# Contributor: Michael Koloberdin <koloberdin@gmail.com>
# Maintainer: Michael Koloberdin <koloberdin@gmail.com>
pkgname=innoextract
pkgver=1.9
pkgrel=10
pkgdesc="A tool to extract installers created by Inno Setup"
url="https://constexpr.org/innoextract/"
arch="all"
license="Zlib"
makedepends="cmake boost-dev samurai xz-dev"
subpackages="$pkgname-doc"
source="http://constexpr.org/innoextract/files/innoextract-$pkgver.tar.gz"
options="!check" # no tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
	install -m644 CHANGELOG "$pkgdir"/usr/share/doc/$pkgname/CHANGELOG
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
2b18f7bb7f50744bcb1bdcd25e57e0760193b179c77b55e0f63c537e55afc98de3b0380da3cae470ce97660ed41a7ffbb48c8c25329c9ce9b3811d9aec74bcde  innoextract-1.9.tar.gz
"
